<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateOpenShopHandleExpireShopMain extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('open_shop_handle_expire_shop_main', function (Blueprint $table) {
            $table->id();

            $table->unsignedInteger("shopCode")->default(0)->comment("rms - shopCode");
            $table->unsignedInteger("shopId")->default(0)->comment("rms - shopId");
            $table->string("orderNo", 60)->default("")->comment("open_shop_sign_order.orderNo 原订单号");
            $table->string("workOrderNo", 60)->default("")->comment("续签订单号");
            $table->unsignedBigInteger("userContractId")->default(0)->comment("open_shop_user_contract.id");
            $table->unsignedInteger("contractStartTime")->default(0)->comment("合同开始时间");
            $table->unsignedInteger("contractEndTime")->default(0)->comment("合同到期时间");

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment   = '开店 - 临期合同门店处理主表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('open_shop_handle_expire_shop_main');
    }
}
